<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../../styles/bootstrap.min.css">
<script src="../../scripts/jquery.min.js"></script>
<script src="../../scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="../customer/js/jsAddress.js"></script>
</head>
<body>
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h4 class="modal-title" id="myModalLabel">订单修改</h4>
	</div>
	<div class="modal-body">
			<form id="updateOrderForm" action="Order_updateOrder.action "  method="post"  class="form-horizontal">
					 <div id="myTabContent" class="tab-content" style="margin: 20px">
						<div class="tab-pane fade in active" id="info">
							    <div class="form-group">
			                                <label class="col-lg-3 control-label">顾客姓名：</label>
			                                <div class="col-lg-5">
			                                	<input type="hidden" name="orders.objId"  value="<s:property value="#session.orders.objId"/>"/>
			                            		<input type="hidden" name="orders.theCustomer.objId"  value="<s:property value="#session.orders.theCustomer.objId"/>"/>
			                                	<input type="hidden" name="orders.thePayment.objId"  value="<s:property value="#session.orders.thePayment.objId"/>"/>    	
			                                	<input type="hidden" name="orders.theConsignee.objId"  value="<s:property value="#session.orders.theConsignee.objId"/>"/>
<%-- 			 									<input type="hidden" name="orders.theConsignee.theCustomer.theCustomerType.objId"  value="<s:property value="#session.orders.theConsignee.theCustomer.theCustomerType.objId"/>"/> --%>			
												<input type="text"  class="form-control"  name="CustomerName"  value="<s:property value="#session.orders.theCustomer.realName"/>"/>
											</div>
								</div>
								<div class="form-group">
			                                <label class="col-lg-3 control-label">顾客手机号码:</label>
			                                <div class="col-lg-5">
												<input type="text"  class="form-control" readonly="readonly" name="orders.theCustomer.mobile"  value="<s:property value="#session.orders.theCustomer.mobile"/>"/> 
											</div>
								</div>
						
								<div class="form-group">
			                                <label class="col-lg-3 control-label">顾客类型:</label>
			                                <div class="col-lg-5">
												<input type="text" readonly="readonly" class="form-control"  value="<s:property value="#session.orders.theCustomer.theCustomerType.typeName"/>"/>
											</div>
								</div>
								
								<div class="form-group">
			                                <label class="col-lg-3 control-label">收货人姓名:</label>
			                                <div class="col-lg-5">
												<input type="text"   class="form-control" name="consigneeName"  value="<s:property value="orders.theConsignee.consigneeName"/>"/>
											</div>
								</div>
						
								<div class="form-group">
			                                <label class="col-lg-3 control-label">收货地址:</label>
			                                <div class="col-lg-5">
			                                		<div class="row">
  															<div class="col-xs-4">
														      省：<select class="form-control" id="cmbProvince" name="province"  value="<s:property value='orders.theConsignee.province'/>"></select>
														    </div>
														      <div class="col-xs-4">
														      	市：<select class="form-control" id="cmbCity" name="city"  value="<s:property value='orders.theConsignee.city'/>"></select>
														    </div>
														    <div class="col-xs-4">
														      区：<select class="form-control"  id="cmbArea" name="area"  value="<s:property value='orders.theConsignee.area'/>"></select>
														    </div> 
														    <div  class="col-xs-12">
														    	详细地址：<input type="text"  class="form-control"  name="detailAddress"  value="<s:property value="orders.theConsignee.detailAddress"/>"/>
														    </div>
													</div>		
													<script type="text/javascript">
														addressInit('cmbProvince', 'cmbCity', 'cmbArea', '<s:property value='orders.theConsignee.province'/>', '<s:property value='orders.theConsignee.city'/>', '<s:property value='orders.theConsignee.area'/>');
													</script>		
												
											</div>
								</div>
								<div class="form-group">
			                                <label class="col-lg-3 control-label">收货人手机号码：:</label>
			                                <div class="col-lg-5">
												<input type="text"  class="form-control"  name="orders.theConsignee.mobilePhone"  value="<s:property value="orders.theConsignee.mobilePhone"/>"/>
											</div>
								</div>					
						
								<div class="form-group">
			                                <label class="col-lg-3 control-label">支付方式：:</label>
			                                  <div class="col-lg-5">
												<input type="text"  class="form-control" readonly="readonly" name="orders.thePayment.thePaymentType.typeName"  value="<s:property value="orders.thePayment.thePaymentType.typeName"/>"/>
											</div>
								</div>
						
								<div class="form-group">
			                                <label class="col-lg-3 control-label">支付状态：:</label>
			                                  <div class="col-lg-5">
			                                  	
												<input type="text"  class="form-control"  name="orders.thePayment.paymentState"  value="<s:property value="orders.thePayment.paymentState"/>"/>
											</div>
								</div>
								<div class="form-group">
			                                <label class="col-lg-3 control-label">订单总价:</label>
			                                  <div class="col-lg-5">
												<input type="text"  class="form-control"  readonly="readonly" name="orders.totalPrice"  value="<s:property value="orders.totalPrice"/>"/>
											</div>
								</div>
								<div class="form-group">
			                                <label class="col-lg-3 control-label">订单状态:</label>
			                                  <div class="col-lg-5">
			                                  	 <select class="form-control"  name="orderState">
														      				<option>-请选择-</option>
														      				<option value="0" <s:if test="#session.orders.orderState==0">selected="selected"</s:if>>待处理</option>
														      				<option value="1"<s:if test="#session.orders.orderState==1">selected="selected"</s:if>>完成</option>
														      				<option value="2"<s:if test="#session.orders.orderState==2">selected="selected"</s:if>>取消</option>					
			                                    </select>
											</div>
								</div>
								<div class="form-group">
			                                <label class="col-lg-3 control-label">订单创建时间:</label>
			                                  <div class="col-lg-5">
												<input type="text"  class="form-control" readonly="readonly" name="orders.createTime"  value="<s:date name="orders.createTime" format="yyy-MM-dd" />"/>
											</div>
								</div>
	
								<div class="form-group">
			                                <label class="col-lg-3 control-label">订单商品列表:</label>
											<table class="table table-hover table-condensed">
												<thead class="row">
													<tr>
														<th>商品名称</th>
														<th>商品个数</th>
														<th>该商品总价</th>
													</tr>
												</thead>
													<tbody>
														<s:iterator value="orders.orderItem" id="oitem">
															<tr>
																<td><s:property value="#oitem.theFurnitureInfo.furnitureName"/></td>
																<td><s:property value="#oitem.amount"/></td>
																<td><s:property value="#oitem.salePrice"/></td>
															</tr>
														</s:iterator>
													</tbody>
										</table>
								</div>
							
							
						
					
								<div class="form-group">
			                            <div class="col-lg-9 col-lg-offset-3">
			                                <button type="submit" class="btn btn-primary">修改</button>
			                             
			                                <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="window.close();">取消</button>
			                            </div>
			                    </div>
						</div>
					</div>
			</form>
	</div>


</body>
</html>